// <!--
//  * 严肃声明：
//  * 开源版本请务必保留此注释头信息，若删除我方将保留所有法律责任追究！
//  * 可正常分享和学习源码，不得用于违法犯罪活动，违者必究！
//  * Copyright (c) 2022 APThink David唐 all rights reserved.
//  * 版权所有，侵权必究！
//  *
// -->
import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      redirect: '/dashboard'
    },
    {
      path: '/dashboard',
      name: 'dashboard',
      component: HomeView
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('@/system/LoginView.vue')
    },
    {
      path: '/role',
      name: 'role',
      component: () => import('@/system/RoleView.vue')
    },
    {
      path: '/department',
      name: 'department',
      component: () => import('@/system/DepartmentView.vue')
    },
    // {
    //   path: '/online',
    //   name: 'online',
    //   component: () => import('@/system/OnlineView.vue')
    // },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('@/views/AboutView.vue')
    },
    {
      path: '/counter',
      name: 'counter',
      component: () => import('@/views/CounterView.vue')
    },
    {
      path: '/layout',
      name: 'layout',
      component: () => import('@/views/LayoutView.vue')
    }
  ]
})

export default router
